package com.winner.data.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.winner.data.entity.User;
import com.winner.data.entity.request.UserParam;
import com.winner.data.entity.vo.UserVo;

/**
 * Mapper接口
 *
 * @author wangxinle5
 * @since 2021-07-19
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 使用了MP的自定义mapper分页查询
     *
     * @param iPage
     * @param userParam
     * @return 结果
     */
    Page<UserVo> selectByPage(Page<?> iPage, @Param("userParam") UserParam userParam);

    User matchCondition(UserParam userParam);

    List<User> match();

    int insertOne(User item);

    List<User> getByList(@Param("list") List<User> list);


    List<User> getByPage(@Param("offset") int offset, @Param("pageSize") int pageSize);

}
